home *** CD-ROM | disk | FTP | other *** search
- /* Example of INPUT() */
-
- /* Get a ReqDef structure */
- rq=rxi_GetReq()
- IF rq == '' | rq == 0 THEN SAY 'ReqDef allocation error'
-
- /* Open a window on WB. Let it be the default IDCMP. */
- wind=rxi_GetWindow('Using Input()',,,,,,,,,)
- IF wind == '' | wind == 0 THEN SAY 'Window open error'
-
- /* Get the user's input via the title bar. Allow 8 characters. Initial the */
- /* input to "Jeff", and the prompt is "What is your name?" */
- response=rxi_Input(wind,rq,8,'What is your name? >','Jeff')
-
- IF response > '' THEN DO
- /* OK. The user didn't type an empty string or press ESC */
- err=rxi_Text(response,wind,10,20)
- END
-
- /* Free the ReqDef */
- rq=rxi_EndReq(rq)
-
- /* Wait for ANY IDCMP */
- spec=rxi_WaitMsg(wind)
-
- /* Close the window, thus freeing any resources for it. */
- wind=rxi_EndWindow(wind)
-